pv-on-hvm: Fix up linux code after hypercall-type-checking changes.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 23 Jan 2008 15:42:52 +0000 (15:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 23 Jan 2008 15:42:52 +0000 (15:42 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
unmodified_drivers/linux-2.6/platform-pci/evtchn.c
unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c

index 39a930e217fb1f838aa13fbb1a39014bf8421475..a22342277c562eee2142a4ad85ca3913d3a5d9f6 100644 (file)
@@ -118,8 +118,8 @@ void unmask_evtchn(int port)
           ever bind event channels to vcpu 0 in HVM guests. */
        if (unlikely(cpu != 0)) {
                evtchn_unmask_t op = { .port = port };
-               (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask,
-                                                 &op);
+               VOID(HYPERVISOR_event_channel_op(EVTCHNOP_unmask,
+                                                &op));
                put_cpu();
                return;
        }
@@ -227,7 +227,8 @@ void unbind_from_irqhandler(unsigned int irq, void *dev_id)
                mask_evtchn(evtchn);
                if (irq_evtchn[irq].close) {
                        struct evtchn_close close = { .port = evtchn };
-                       HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
+                       if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
+                               BUG();
                }
        }
 
@@ -310,7 +311,7 @@ static irqreturn_t evtchn_interrupt(int irq, void *dev_id
 
 void force_evtchn_callback(void)
 {
-       (void)HYPERVISOR_xen_version(0, NULL);
+       VOID(HYPERVISOR_xen_version(0, NULL));
 }
 EXPORT_SYMBOL(force_evtchn_callback);
 
index cb8cded198ce058d3c36748eafc1f41cdddb26fb..f1f5a4558dce68a242effb11a972f8adac68d970 100644 (file)
@@ -58,7 +58,7 @@ static int bp_suspend(void)
 
        BUG_ON(!irqs_disabled());
 
-       suspend_cancelled = HYPERVISOR_shutdown(SHUTDOWN_suspend);
+       suspend_cancelled = HYPERVISOR_suspend(0);
 
        if (!suspend_cancelled) {
                write_lock(&suspend_lock);